package com.iss.demo.service;

import com.iss.demo.dao.ShopcarDao;
import com.iss.demo.entity.Shopcar;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.ArrayList;
import java.util.List;

@Service
public class ShopcarService {
    @Autowired
    private ShopcarDao dao;

    public List<Shopcar>selectAll(){
        List<Shopcar> list = new ArrayList<>();
        list=dao.selectAll();
        return list;
    }

    public Shopcar selectById(Integer id){return dao.selectByid(id);}
    public Integer insert(Shopcar shopcar){
        return dao.insert(shopcar);
    }
    public Integer deleteOne(Integer s_id){
        return dao.deleteOne(s_id);
    }

    public Integer clear(){
        return dao.clear();
    }
}
